<!doctype html>
<html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
            .table-bordered > thead > tr > th,
            .table-bordered > tbody > tr > th,
            .table-bordered > tfoot > tr > th,
            .table-bordered > thead > tr > td,
            .table-bordered > tbody > tr > td,
            .table-bordered > tfoot > tr > td
			{
                border: 1px solid rgb(221, 221, 221);
            }
            .table > thead > tr > th,
            .table > tbody > tr > th,
            .table > tfoot > tr > th,
            .table > thead > tr > td,
            .table > tbody > tr > td,
            .table > tfoot > tr > td 
			{
                padding: 8px;
                line-height: 1.42857;
                vertical-align: top;
                border-top: 1px solid rgb(221, 221, 221);
            }
        </style>
    </head>
    <body>
        <div id="container">
            <div id="main" role="main" style="padding:20px;">
                <table class="table table-bordered" border="0" cellpadding="0" cellspacing="0">
                    <tbody><tr style="height:34.4pt">
                            <th colspan="2">
                                LPG System
                            </th>
                            <th colspan="2">
							Gasifier
                            </th>
                        </tr>
                        <tr style="height:45.4pt">
                            <td valign="top">
                                1.Consumption of LPG
                            </td>
                            <td><input id="conlpg" onKeyUp="myFunction()" value="4" size="1"/> Kgs/Hr
                               
                            </td>
                            <td valign="top">2.Wood chips Consumption Chips/Kg of LPG = 5 Kgs                       
                            </td>
                            <td valign="top">
                                <input id="conchips" onKeyUp="myFunction()" value="20" size="1"/> Kgs/Hr
                            </td>
                        </tr>
                        <tr align="center">
                            <td colspan="4" valign="top">3.Number
                                of hours usage <input id="useday" onKeyUp="myFunction()" value="8" size="1"/> Hrs /Day
                                <br/><br/>
                                4.Number of months <input id="formonth" onKeyUp="myFunction()" value="4" size="1"/>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td valign="top">
                                7.LPG consumption per Month( <b id="loutputhr">8</b> Hrs x  <b id="loutput">4</b> Kgs x 30 Days )
                            </td>
                            <td valign="top">
                                <b id="loutputtotal">960</b> Kgs/M
                            </td>
                            <td valign="top">
                                8.Wood chips consumption per month
                                &nbsp;( <b id="goutputhr">8</b> Hrs x <b id="goutput">20</b> Kgs x 30 Days ) O/p
                            </td>
                            <td valign="top">
                                <b id="goutputtotal">4800</b> Kgs/M
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                                5.Cost of &nbsp;&nbsp;LPG /Kg (Rs.)
                            </td>
                            <td valign="top">
                               <input id="lpgcost" onKeyUp="myFunction()" value="90" size="1"/>
                            </td>
                            <td valign="top">
                                6.Cost of Wood chips /Kg (Rs.)
                            </td>
                            <td valign="top">
                               <input id="gcost" onKeyUp="myFunction()" value="6" size="1"/>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                                9.Monthly cost of LPG  o/p
                            </td>
                            <td>Rs. <b id="lpgcostmn">86400</b>/M
                            </td>
                            <td valign="top">
                                10.Cost of Wood chips
                                ( 4800 Kgs x 6 Rs. )
                            </td>
                            <td valign="top">
                                Rs.<b id="gcostmn">28800</b>/M
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" colspan="4">
                                11.Gross Savings by Gasifier, Rs.<b id="gross">57,000</b>/- 
                            </td>
                        </tr>
                    </tbody></table>
            </div>
        </div>
        <script type="text/javascript">
		
function myFunction()
{

    var input_lpg = document.getElementById('conlpg');
    var input_chips = document.getElementById('conchips');
    var useday = document.getElementById('useday');
    var lpgcost = document.getElementById('lpgcost');
    var gcost = document.getElementById('gcost');

    input_lpg.onkeyup = function() 
	{
        document.getElementById('loutput').innerHTML = input_lpg.value;
        updateTotalL();
        updateLpgtCost();
    };
    useday.onkeyup = function() 
	{
        document.getElementById('loutputhr').innerHTML = useday.value;
        document.getElementById('goutputhr').innerHTML = useday.value;
        updateTotalL();
        updateLpgtCost();
        updateTotalG();
        updategtCost();
    };
    formonth.onkeyup = function() 
	{
        updateTotalL();
        updateTotalG();
        updateLpgtCost();
        updategtCost();
    };


// Gasifier Section
    input_chips.onkeyup = function() 
	{
        document.getElementById('goutput').innerHTML = input_chips.value;
        updateTotalG();
        updategtCost();
    };

    lpgcost.onkeyup = function() 
	{
    	updateLpgtCost();
    };
    gcost.onkeyup = function() 
	{
    	updategtCost();
    };
}

function updateLpgtCost() 
{

    var cost = document.getElementById('lpgcost').value;
    var input_lpg = document.getElementById('conlpg').value;
    var useday = document.getElementById('useday').value;
    total = input_lpg * useday * 30;
    total2 = cost * total;
    document.getElementById('lpgcostmn').innerHTML = total2;
    gross();
}

function updategtCost() 
{

    var cost = document.getElementById('gcost').value;
    var cinput_lpg = document.getElementById('conchips').value;
    var cuseday = document.getElementById('useday').value;
    ctotal = cinput_lpg * cuseday * 30;
    total2 = cost * ctotal;
    document.getElementById('gcostmn').innerHTML = total2;
    gross();

}
function updateTotalL() 
{
    var input_lpg = document.getElementById('conlpg').value;
    var useday = document.getElementById('useday').value;
    total = input_lpg * useday * 30;
    document.getElementById('loutput').innerHTML = input_lpg;
    document.getElementById('loutputhr').innerHTML = useday;
    document.getElementById('loutputtotal').innerHTML = total;

}

function updateTotalG() 
{
    var cinput_lpg = document.getElementById('conchips').value;
    var cuseday = document.getElementById('useday').value;
    ctotal = cinput_lpg * cuseday * 30;
    document.getElementById('goutput').innerHTML = cinput_lpg;
    document.getElementById('loutputhr').innerHTML = cuseday;
    document.getElementById('goutputtotal').innerHTML = ctotal;

}

function gross() 
{
    var formonth = document.getElementById('formonth').value;
    var gcost = document.getElementById('gcostmn').innerHTML;
    var lpgcost = document.getElementById('lpgcostmn').innerHTML;
    total = (lpgcost - gcost)* formonth;
    document.getElementById('gross').innerHTML = total + " for "+ formonth + " month";
}
        </script>
    </body>
</html>